﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

// Class representing 1 row of the Ingredients table (DB_version 3) 

namespace StoveTop.Models
{
	public class Ingredient
	{
		private int _id;
		private string _name;
		private decimal _quantityOnHand;
		private string _units;
		private decimal _quantityInList;

		// Constructors
		public Ingredient() {
		}
		public Ingredient(int id, string name, decimal quantityOnHand, string units, decimal quantityInList){
			_id = id;
			_name = name;
			_quantityOnHand = quantityOnHand;
			_units = units;
			_quantityInList = quantityInList;
		}

		// Setters
		public void SetId(int id) {
			_id = id;
		}
		public void SetName(string name) {
			_name = name;
		}
		public void SetQuantityOnHand (decimal quantityOnHand) {
			_quantityOnHand = quantityOnHand;
		}
		public void SetUnits (string units) {
			_units = units;
		}
		public void SetQuantityInList (decimal quantityInList) {
			_quantityInList	= quantityInList;
		}
		// Getters
		public int GetId() {
			return _id;
		}
		public string GetName() {
			return _name;
		}
		public decimal GetQuantityOnHand () {
			return _quantityOnHand;
		}
		public decimal GetQuantityInList() {
			return _quantityInList;
		}
		public string GetUnits() {
			return _units;
		}

		// Other Useful Methods
		public override string ToString() {
			return "Ingredient [id=" + _id + " name=" + _name + " quantityOnHand=" + _quantityOnHand + " quantityInList=" + _quantityInList + " units=" + _units +"]";
		}
	}
}


